#!/bin/bash




echo "mv /usr/local /usr/local-old"
echo "Dont forget to mv /usr/local-old /usr/local"
mv /usr/local /usr/local-old

mkdir -p logs
echo "See $PWD/logs directory for details"
echo
echo "Starting compilation ...."
echo

for file in `echo "mplayer-vmware.sh"`
do
    #killall Console 2> /dev/null
    sleep 1
    #open -a Console logs/$file.log 
    SCRIPT=$file ; echo -n "Starting $SCRIPT : " ; ./video_tools_scripts/$SCRIPT > logs/$SCRIPT.log 2>&1 && echo " OK" || echo " failed (logs/$SCRIPT.log for details)"
done

rm -rf /new_root_video_tools
mkdir -p /new_root_video_tools/usr/
mv /usr/local /new_root_video_tools/usr/
mv /usr/local-old /usr/local

echo
echo
echo "See /new_root_video_tools for result !"
echo

